#pragma once

#include <SFML/System/Thread.hpp>

class Runnable
{
public:
	Runnable(void);
	~Runnable(void);

	virtual void Run() = 0;
};

class ThreadRunner : public sf::Thread
{
public:
	ThreadRunner(Runnable* runnable, int sleepMillis);
	~ThreadRunner(void);

	void Start();
	void Stop();

private:
	void Run();

	Runnable* runnable;
	int sleepMillis;
	volatile bool isRunning;
};